sub main()	dim s as string, m as string	dim r as regEx,rm as regExMatch    	msgbox("RegEx Class Test")	//setup the source string	s = "<html><head><title>Hello</title></head><body><b>My bold 1</b>"	s = s & "<br><b>My bold 2</b><u>some underline</u>"	s = s & "<b>Hello bold 3</b></body></html>"    	r = new regEx	//find bold tags	r.searchpattern = "<b>(.+)</b>"	r.greedy = false	r.dotMatchall = false
	rm = r.search(s, 0)		dim i as integer,c as integer	   	if rm.nil = true then		msgbox("Text not found")		quit	end if
	m = rm.SubExpressionString(0)	while rm.nil = false		m = rm.SubExpressionString(1)		msgbox("Matched:\r" & m)
		i = m.len() + rm.subExpressionStart(1)	    	rm = r.search(s,i)	wend	msgbox("Test done")end sub